﻿using System;
using System.Web.Services;
using System.Web.UI;
using QuanLyHopDong.Biz;
using QuanLyHopDong.Web.Common;

namespace QuanLyHopDong.Web
{
    public partial class _Default : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        #region Web methods

        [WebMethod(EnableSession = true)]
        public static object GetHopDongDuocGiao()
        {
            var records = DashboardBiz.GetHopDongDuocGiao(WebCommon.CurrrentEmployee.Id);
            return new {Result = "OK", Records = records};

        }

        [WebMethod(EnableSession = true)]
        public static object HopDongByEmployees()
        {
            var records = DashboardBiz.HopDongByEmployees();
            return new { Result = "OK", Records = records };

        }

        [WebMethod(EnableSession = true)]
        public static object GetAllHopDong()
        {
            var records = DashboardBiz.GetHopDongDuocGiao(0);
            return new { Result = "OK", Records = records };

        }

        #endregion
    }
}